#ifndef SERVER_H_
# define SERVER_H_


#include <stdio.h>
//#include <stropts.h>
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <linux/netdevice.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <unistd.h>
#include <stdlib.h>
#include <netdb.h>
#include <sys/types.h>
#include <time.h>
#include <string.h>
#include <errno.h>
#include <dirent.h>

#define CURRENT_DIR "./test/"
#define BUFFSIZE 1024

int	create_socket(void);
void	init_socket(int			socket,
		    struct sockaddr_in	addr,
		    int			sanport);
int	join_multicast(int		socket,
		       struct ip_mreq	mreq);
char	*get_ip(void);
char	*get_groupip(char	*src);
char	*extract(char*	s,
		 int	start,
		 int	end);

int	need_ip(char	*buff,
		int	soc,
		int	port);

#endif /* !SERVER_H_ */
